package com.tpc.control.jpa;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * StatusMappingId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class StatusMappingId implements java.io.Serializable {

	// Fields

	private String statusType;
	private Integer statusCode;
	private String statusSap;

	// Constructors

	/** default constructor */
	public StatusMappingId() {
	}

	/** full constructor */
	public StatusMappingId(String statusType, Integer statusCode,
			String statusSap) {
		this.statusType = statusType;
		this.statusCode = statusCode;
		this.statusSap = statusSap;
	}

	// Property accessors

	@Column(name = "status_type", nullable = false, length = 20)
	public String getStatusType() {
		return this.statusType;
	}

	public void setStatusType(String statusType) {
		this.statusType = statusType;
	}

	@Column(name = "status_code", nullable = false)
	public Integer getStatusCode() {
		return this.statusCode;
	}

	public void setStatusCode(Integer statusCode) {
		this.statusCode = statusCode;
	}

	@Column(name = "status_sap", nullable = false, length = 4)
	public String getStatusSap() {
		return this.statusSap;
	}

	public void setStatusSap(String statusSap) {
		this.statusSap = statusSap;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof StatusMappingId))
			return false;
		StatusMappingId castOther = (StatusMappingId) other;

		return ((this.getStatusType() == castOther.getStatusType()) || (this
				.getStatusType() != null
				&& castOther.getStatusType() != null && this.getStatusType()
				.equals(castOther.getStatusType())))
				&& ((this.getStatusCode() == castOther.getStatusCode()) || (this
						.getStatusCode() != null
						&& castOther.getStatusCode() != null && this
						.getStatusCode().equals(castOther.getStatusCode())))
				&& ((this.getStatusSap() == castOther.getStatusSap()) || (this
						.getStatusSap() != null
						&& castOther.getStatusSap() != null && this
						.getStatusSap().equals(castOther.getStatusSap())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getStatusType() == null ? 0 : this.getStatusType()
						.hashCode());
		result = 37
				* result
				+ (getStatusCode() == null ? 0 : this.getStatusCode()
						.hashCode());
		result = 37 * result
				+ (getStatusSap() == null ? 0 : this.getStatusSap().hashCode());
		return result;
	}

}